/**
  ******************************************************************************
  * File Name          : sfspi.h
  * Description        : This file provides code for the configuration
  *                      of the SPI instances.
  ******************************************************************************
  * @attention
  *
  ******************************************************************************
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __sfbsp_H
#define __sfbsp_H

/* Includes ------------------------------------------------------------------*/
#include "gd32f4xx.h"

#define SFLASH_WP_Pin           GPIO_PIN_8
#define SFLASH_WP_GPIO_Port     GPIOD
#define SFLASH_WP_LOW()         (GPIO_BC(SFLASH_WP_GPIO_Port) = (uint32_t)SFLASH_WP_Pin)
#define SFLASH_WP_HIGH()        (GPIO_BOP(SFLASH_WP_GPIO_Port) = (uint32_t)SFLASH_WP_Pin)

#define SFLASH_CS_Pin           GPIO_PIN_12
#define SFLASH_CS_GPIO_Port     GPIOB
#define SFLASH_CS_LOW()         (GPIO_BC(SFLASH_CS_GPIO_Port) = (uint32_t)SFLASH_CS_Pin)
#define SFLASH_CS_HIGH()        (GPIO_BOP(SFLASH_CS_GPIO_Port) = (uint32_t)SFLASH_CS_Pin)

#endif /* __sfbsp_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
